<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>serial: include/serial/impl/win.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">serial
   &#160;<span id="projectnumber">1.1.0</span>
   </div>
   <div id="projectbrief">Cross-platform, serial port library written in C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_f22bcfb215a71b7a0026d80fdd46745d.html">serial</a></li><li class="navelem"><a class="el" href="dir_71822160d5971ae8d054aa6606a203bf.html">impl</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">win.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="win_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#if defined(_WIN32)</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#ifndef SERIAL_IMPL_WINDOWS_H</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#define SERIAL_IMPL_WINDOWS_H</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="serial_8h.html">serial/serial.h</a>&quot;</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &quot;windows.h&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceserial.html">serial</a> {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">using</span> std::string;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">using</span> std::wstring;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">using</span> std::invalid_argument;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">using</span> <a class="code" href="classserial_1_1_serial_exception.html">serial::SerialException</a>;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">using</span> <a class="code" href="classserial_1_1_i_o_exception.html">serial::IOException</a>;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">class </span>serial::Serial::SerialImpl {</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  SerialImpl (<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;port,</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;              <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> baudrate,</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;              <a class="code" href="namespaceserial.html#a00b3281fa11cea770c0b0c8a106080f8">bytesize_t</a> bytesize,</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;              <a class="code" href="namespaceserial.html#a8f45d26bf7c9a06659e75b5004a50481">parity_t</a> parity,</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;              <a class="code" href="namespaceserial.html#af5b116611d6628a3aa8f788fdc09f469">stopbits_t</a> stopbits,</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;              <a class="code" href="namespaceserial.html#a93ef57a314b4e562f9eded6c15d34351">flowcontrol_t</a> flowcontrol);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="keyword">virtual</span> ~SerialImpl ();</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <a class="code" href="classserial_1_1_serial.html#af3644ed1a9d899b70e9d63bb9b808d62">open</a> ();</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <a class="code" href="classserial_1_1_serial.html#afbe59407e718bc3d22ea4a67b304db6c">close</a> ();</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <a class="code" href="classserial_1_1_serial.html#af9895af496189f7f0aba7c097f5fa9c1">isOpen</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="keywordtype">size_t</span></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <a class="code" href="classserial_1_1_serial.html#afafe25b2f3bb0809550abdc72c51a234">available</a> ();</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  </div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ad6e395bfe91718b66f6695c10ee90e5b">waitReadable</a> (uint32_t timeout);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a318262c05074a9da15d410f8af29c15c">waitByteTimes</a> (<span class="keywordtype">size_t</span> count);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordtype">size_t</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a0261dbfb9361784ecb3eee98b85fa103">read</a> (uint8_t *buf, <span class="keywordtype">size_t</span> size = 1);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  <span class="keywordtype">size_t</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <a class="code" href="classserial_1_1_serial.html#aa020880cdff3a370ddc574f594379c3c">write</a> (<span class="keyword">const</span> uint8_t *data, <span class="keywordtype">size_t</span> length);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a63b7abf172cad25bfc998b3b1f98310f">flush</a> ();</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <a class="code" href="classserial_1_1_serial.html#afa2c1f9114a37b7d140fc2292d1499b9">flushInput</a> ();</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a256ee4bb93ab0e79d7a66b50f08dce53">flushOutput</a> ();</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ade90ff8f03525ea6d7b702fcd0f336de">sendBreak</a> (<span class="keywordtype">int</span> duration);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a2a27912b1ca5cdad4a4aba7b9ddbc206">setBreak</a> (<span class="keywordtype">bool</span> level);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ab43ddc05e5d69ff2778f698aa7062370">setRTS</a> (<span class="keywordtype">bool</span> level);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ac9b0bbf613a5fe68f05d1d40181a1bb3">setDTR</a> (<span class="keywordtype">bool</span> level);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a419dc984258956a5adb41fb8c86f5449">waitForChange</a> ();</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a809f048546c4c72b74e205139b97648c">getCTS</a> ();</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a6b9a0c485e1fe599dbb5e9e15b1a65d6">getDSR</a> ();</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <a class="code" href="classserial_1_1_serial.html#afb96e6968f040c4bff7576095f4ba6e7">getRI</a> ();</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  <span class="keywordtype">bool</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a9795a3e83e6745a14c64f657e68061fb">getCD</a> ();</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <a class="code" href="classserial_1_1_serial.html#acecb0a5102ae0c944fe4b78e4adf839a">setPort</a> (<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;port);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="keywordtype">string</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ae95cd057e90258b1b3203ff8972a3567">getPort</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a4fc63af4b800a9f9e757414f38f3e8b3">setTimeout</a> (Timeout &amp;timeout);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  Timeout</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a765fccd0e53562773626fb39bb2efcb6">getTimeout</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ad4f7e9edff11b464199e94a43dfd19bf">setBaudrate</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> baudrate);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span></div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a9b57d6da619d53f58cddc3621c78c32b">getBaudrate</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  <a class="code" href="classserial_1_1_serial.html#adba430fd704f6898a5a1d99fd39a94fa">setBytesize</a> (<a class="code" href="namespaceserial.html#a00b3281fa11cea770c0b0c8a106080f8">bytesize_t</a> bytesize);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  <a class="code" href="namespaceserial.html#a00b3281fa11cea770c0b0c8a106080f8">bytesize_t</a></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a4fce90ef7a9a46525efa373a94a1bfbd">getBytesize</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a1e1896aa59ec35ac5bd263b87614ef01">setParity</a> (<a class="code" href="namespaceserial.html#a8f45d26bf7c9a06659e75b5004a50481">parity_t</a> parity);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <a class="code" href="namespaceserial.html#a8f45d26bf7c9a06659e75b5004a50481">parity_t</a></div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a89d876e1d3f0afadb0d6c21b08ed8931">getParity</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ab72284b5aab723b81013fb560bd6acc5">setStopbits</a> (<a class="code" href="namespaceserial.html#af5b116611d6628a3aa8f788fdc09f469">stopbits_t</a> stopbits);</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  <a class="code" href="namespaceserial.html#af5b116611d6628a3aa8f788fdc09f469">stopbits_t</a></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  <a class="code" href="classserial_1_1_serial.html#a42887bb76243bf6bbb3f69ff60f9792e">getStopbits</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;  <a class="code" href="classserial_1_1_serial.html#ade41650d6bfe91b6432e5a0a60c03969">setFlowcontrol</a> (<a class="code" href="namespaceserial.html#a93ef57a314b4e562f9eded6c15d34351">flowcontrol_t</a> flowcontrol);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  <a class="code" href="namespaceserial.html#a93ef57a314b4e562f9eded6c15d34351">flowcontrol_t</a></div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;  <a class="code" href="classserial_1_1_serial.html#acdc6da48a5434b936b1db20f36caf41f">getFlowcontrol</a> () <span class="keyword">const</span>;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;  readLock ();</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;  readUnlock ();</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  writeLock ();</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  <span class="keywordtype">void</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  writeUnlock ();</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  <span class="keywordtype">void</span> reconfigurePort ();</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  wstring port_;               <span class="comment">// Path to the file descriptor</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  HANDLE fd_;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  <span class="keywordtype">bool</span> is_open_;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;  Timeout timeout_;           <span class="comment">// Timeout for read operations</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> baudrate_;    <span class="comment">// Baudrate</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  <a class="code" href="namespaceserial.html#a8f45d26bf7c9a06659e75b5004a50481">parity_t</a> parity_;           <span class="comment">// Parity</span></div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  <a class="code" href="namespaceserial.html#a00b3281fa11cea770c0b0c8a106080f8">bytesize_t</a> bytesize_;       <span class="comment">// Size of the bytes</span></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;  <a class="code" href="namespaceserial.html#af5b116611d6628a3aa8f788fdc09f469">stopbits_t</a> stopbits_;       <span class="comment">// Stop Bits</span></div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  <a class="code" href="namespaceserial.html#a93ef57a314b4e562f9eded6c15d34351">flowcontrol_t</a> flowcontrol_; <span class="comment">// Flow Control</span></div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  <span class="comment">// Mutex used to lock the read functions</span></div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  HANDLE read_mutex;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  <span class="comment">// Mutex used to lock the write functions</span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  HANDLE write_mutex;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;};</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;}</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="preprocessor">#endif // SERIAL_IMPL_WINDOWS_H</span></div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="preprocessor">#endif // if defined(_WIN32)</span></div><div class="ttc" id="classserial_1_1_serial_html_a89d876e1d3f0afadb0d6c21b08ed8931"><div class="ttname"><a href="classserial_1_1_serial.html#a89d876e1d3f0afadb0d6c21b08ed8931">serial::Serial::getParity</a></div><div class="ttdeci">parity_t getParity() const </div><div class="ttdef"><b>Definition:</b> serial.cc:323</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ad4f7e9edff11b464199e94a43dfd19bf"><div class="ttname"><a href="classserial_1_1_serial.html#ad4f7e9edff11b464199e94a43dfd19bf">serial::Serial::setBaudrate</a></div><div class="ttdeci">void setBaudrate(uint32_t baudrate)</div><div class="ttdef"><b>Definition:</b> serial.cc:293</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a4fce90ef7a9a46525efa373a94a1bfbd"><div class="ttname"><a href="classserial_1_1_serial.html#a4fce90ef7a9a46525efa373a94a1bfbd">serial::Serial::getBytesize</a></div><div class="ttdeci">bytesize_t getBytesize() const </div><div class="ttdef"><b>Definition:</b> serial.cc:311</div></div>
<div class="ttc" id="classserial_1_1_serial_html_afbe59407e718bc3d22ea4a67b304db6c"><div class="ttname"><a href="classserial_1_1_serial.html#afbe59407e718bc3d22ea4a67b304db6c">serial::Serial::close</a></div><div class="ttdeci">void close()</div><div class="ttdef"><b>Definition:</b> serial.cc:87</div></div>
<div class="ttc" id="classserial_1_1_serial_html_aa020880cdff3a370ddc574f594379c3c"><div class="ttname"><a href="classserial_1_1_serial.html#aa020880cdff3a370ddc574f594379c3c">serial::Serial::write</a></div><div class="ttdeci">size_t write(const uint8_t *data, size_t size)</div><div class="ttdef"><b>Definition:</b> serial.cc:252</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ade90ff8f03525ea6d7b702fcd0f336de"><div class="ttname"><a href="classserial_1_1_serial.html#ade90ff8f03525ea6d7b702fcd0f336de">serial::Serial::sendBreak</a></div><div class="ttdeci">void sendBreak(int duration)</div><div class="ttdef"><b>Definition:</b> serial.cc:371</div></div>
<div class="ttc" id="namespaceserial_html_a8f45d26bf7c9a06659e75b5004a50481"><div class="ttname"><a href="namespaceserial.html#a8f45d26bf7c9a06659e75b5004a50481">serial::parity_t</a></div><div class="ttdeci">parity_t</div><div class="ttdef"><b>Definition:</b> serial.h:66</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ae95cd057e90258b1b3203ff8972a3567"><div class="ttname"><a href="classserial_1_1_serial.html#ae95cd057e90258b1b3203ff8972a3567">serial::Serial::getPort</a></div><div class="ttdeci">std::string getPort() const </div><div class="ttdef"><b>Definition:</b> serial.cc:276</div></div>
<div class="ttc" id="classserial_1_1_serial_html_af3644ed1a9d899b70e9d63bb9b808d62"><div class="ttname"><a href="classserial_1_1_serial.html#af3644ed1a9d899b70e9d63bb9b808d62">serial::Serial::open</a></div><div class="ttdeci">void open()</div><div class="ttdef"><b>Definition:</b> serial.cc:81</div></div>
<div class="ttc" id="classserial_1_1_serial_html_acdc6da48a5434b936b1db20f36caf41f"><div class="ttname"><a href="classserial_1_1_serial.html#acdc6da48a5434b936b1db20f36caf41f">serial::Serial::getFlowcontrol</a></div><div class="ttdeci">flowcontrol_t getFlowcontrol() const </div><div class="ttdef"><b>Definition:</b> serial.cc:347</div></div>
<div class="ttc" id="namespaceserial_html_a00b3281fa11cea770c0b0c8a106080f8"><div class="ttname"><a href="namespaceserial.html#a00b3281fa11cea770c0b0c8a106080f8">serial::bytesize_t</a></div><div class="ttdeci">bytesize_t</div><div class="ttdef"><b>Definition:</b> serial.h:56</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a256ee4bb93ab0e79d7a66b50f08dce53"><div class="ttname"><a href="classserial_1_1_serial.html#a256ee4bb93ab0e79d7a66b50f08dce53">serial::Serial::flushOutput</a></div><div class="ttdeci">void flushOutput()</div><div class="ttdef"><b>Definition:</b> serial.cc:365</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ac9b0bbf613a5fe68f05d1d40181a1bb3"><div class="ttname"><a href="classserial_1_1_serial.html#ac9b0bbf613a5fe68f05d1d40181a1bb3">serial::Serial::setDTR</a></div><div class="ttdeci">void setDTR(bool level=true)</div><div class="ttdef"><b>Definition:</b> serial.cc:386</div></div>
<div class="ttc" id="namespaceserial_html"><div class="ttname"><a href="namespaceserial.html">serial</a></div><div class="ttdef"><b>Definition:</b> unix.h:47</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a6b9a0c485e1fe599dbb5e9e15b1a65d6"><div class="ttname"><a href="classserial_1_1_serial.html#a6b9a0c485e1fe599dbb5e9e15b1a65d6">serial::Serial::getDSR</a></div><div class="ttdeci">bool getDSR()</div><div class="ttdef"><b>Definition:</b> serial.cc:401</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a809f048546c4c72b74e205139b97648c"><div class="ttname"><a href="classserial_1_1_serial.html#a809f048546c4c72b74e205139b97648c">serial::Serial::getCTS</a></div><div class="ttdeci">bool getCTS()</div><div class="ttdef"><b>Definition:</b> serial.cc:396</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a4fc63af4b800a9f9e757414f38f3e8b3"><div class="ttname"><a href="classserial_1_1_serial.html#a4fc63af4b800a9f9e757414f38f3e8b3">serial::Serial::setTimeout</a></div><div class="ttdeci">void setTimeout(Timeout &amp;timeout)</div><div class="ttdef"><b>Definition:</b> serial.cc:282</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a63b7abf172cad25bfc998b3b1f98310f"><div class="ttname"><a href="classserial_1_1_serial.html#a63b7abf172cad25bfc998b3b1f98310f">serial::Serial::flush</a></div><div class="ttdeci">void flush()</div><div class="ttdef"><b>Definition:</b> serial.cc:352</div></div>
<div class="ttc" id="classserial_1_1_serial_html_afa2c1f9114a37b7d140fc2292d1499b9"><div class="ttname"><a href="classserial_1_1_serial.html#afa2c1f9114a37b7d140fc2292d1499b9">serial::Serial::flushInput</a></div><div class="ttdeci">void flushInput()</div><div class="ttdef"><b>Definition:</b> serial.cc:359</div></div>
<div class="ttc" id="classserial_1_1_i_o_exception_html"><div class="ttname"><a href="classserial_1_1_i_o_exception.html">serial::IOException</a></div><div class="ttdef"><b>Definition:</b> serial.h:690</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a2a27912b1ca5cdad4a4aba7b9ddbc206"><div class="ttname"><a href="classserial_1_1_serial.html#a2a27912b1ca5cdad4a4aba7b9ddbc206">serial::Serial::setBreak</a></div><div class="ttdeci">void setBreak(bool level=true)</div><div class="ttdef"><b>Definition:</b> serial.cc:376</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a419dc984258956a5adb41fb8c86f5449"><div class="ttname"><a href="classserial_1_1_serial.html#a419dc984258956a5adb41fb8c86f5449">serial::Serial::waitForChange</a></div><div class="ttdeci">bool waitForChange()</div><div class="ttdef"><b>Definition:</b> serial.cc:391</div></div>
<div class="ttc" id="serial_8h_html"><div class="ttname"><a href="serial_8h.html">serial.h</a></div></div>
<div class="ttc" id="classserial_1_1_serial_html_a42887bb76243bf6bbb3f69ff60f9792e"><div class="ttname"><a href="classserial_1_1_serial.html#a42887bb76243bf6bbb3f69ff60f9792e">serial::Serial::getStopbits</a></div><div class="ttdeci">stopbits_t getStopbits() const </div><div class="ttdef"><b>Definition:</b> serial.cc:335</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a9795a3e83e6745a14c64f657e68061fb"><div class="ttname"><a href="classserial_1_1_serial.html#a9795a3e83e6745a14c64f657e68061fb">serial::Serial::getCD</a></div><div class="ttdeci">bool getCD()</div><div class="ttdef"><b>Definition:</b> serial.cc:411</div></div>
<div class="ttc" id="classserial_1_1_serial_html_af9895af496189f7f0aba7c097f5fa9c1"><div class="ttname"><a href="classserial_1_1_serial.html#af9895af496189f7f0aba7c097f5fa9c1">serial::Serial::isOpen</a></div><div class="ttdeci">bool isOpen() const </div><div class="ttdef"><b>Definition:</b> serial.cc:93</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ab43ddc05e5d69ff2778f698aa7062370"><div class="ttname"><a href="classserial_1_1_serial.html#ab43ddc05e5d69ff2778f698aa7062370">serial::Serial::setRTS</a></div><div class="ttdeci">void setRTS(bool level=true)</div><div class="ttdef"><b>Definition:</b> serial.cc:381</div></div>
<div class="ttc" id="classserial_1_1_serial_html_adba430fd704f6898a5a1d99fd39a94fa"><div class="ttname"><a href="classserial_1_1_serial.html#adba430fd704f6898a5a1d99fd39a94fa">serial::Serial::setBytesize</a></div><div class="ttdeci">void setBytesize(bytesize_t bytesize)</div><div class="ttdef"><b>Definition:</b> serial.cc:305</div></div>
<div class="ttc" id="classserial_1_1_serial_html_acecb0a5102ae0c944fe4b78e4adf839a"><div class="ttname"><a href="classserial_1_1_serial.html#acecb0a5102ae0c944fe4b78e4adf839a">serial::Serial::setPort</a></div><div class="ttdeci">void setPort(const std::string &amp;port)</div><div class="ttdef"><b>Definition:</b> serial.cc:265</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a765fccd0e53562773626fb39bb2efcb6"><div class="ttname"><a href="classserial_1_1_serial.html#a765fccd0e53562773626fb39bb2efcb6">serial::Serial::getTimeout</a></div><div class="ttdeci">Timeout getTimeout() const </div><div class="ttdef"><b>Definition:</b> serial.cc:288</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ad6e395bfe91718b66f6695c10ee90e5b"><div class="ttname"><a href="classserial_1_1_serial.html#ad6e395bfe91718b66f6695c10ee90e5b">serial::Serial::waitReadable</a></div><div class="ttdeci">bool waitReadable()</div><div class="ttdef"><b>Definition:</b> serial.cc:105</div></div>
<div class="ttc" id="classserial_1_1_serial_exception_html"><div class="ttname"><a href="classserial_1_1_serial_exception.html">serial::SerialException</a></div><div class="ttdef"><b>Definition:</b> serial.h:672</div></div>
<div class="ttc" id="classserial_1_1_serial_html_afb96e6968f040c4bff7576095f4ba6e7"><div class="ttname"><a href="classserial_1_1_serial.html#afb96e6968f040c4bff7576095f4ba6e7">serial::Serial::getRI</a></div><div class="ttdeci">bool getRI()</div><div class="ttdef"><b>Definition:</b> serial.cc:406</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ab72284b5aab723b81013fb560bd6acc5"><div class="ttname"><a href="classserial_1_1_serial.html#ab72284b5aab723b81013fb560bd6acc5">serial::Serial::setStopbits</a></div><div class="ttdeci">void setStopbits(stopbits_t stopbits)</div><div class="ttdef"><b>Definition:</b> serial.cc:329</div></div>
<div class="ttc" id="namespaceserial_html_af5b116611d6628a3aa8f788fdc09f469"><div class="ttname"><a href="namespaceserial.html#af5b116611d6628a3aa8f788fdc09f469">serial::stopbits_t</a></div><div class="ttdeci">stopbits_t</div><div class="ttdef"><b>Definition:</b> serial.h:77</div></div>
<div class="ttc" id="classserial_1_1_serial_html_ade41650d6bfe91b6432e5a0a60c03969"><div class="ttname"><a href="classserial_1_1_serial.html#ade41650d6bfe91b6432e5a0a60c03969">serial::Serial::setFlowcontrol</a></div><div class="ttdeci">void setFlowcontrol(flowcontrol_t flowcontrol)</div><div class="ttdef"><b>Definition:</b> serial.cc:341</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a0261dbfb9361784ecb3eee98b85fa103"><div class="ttname"><a href="classserial_1_1_serial.html#a0261dbfb9361784ecb3eee98b85fa103">serial::Serial::read</a></div><div class="ttdeci">size_t read(uint8_t *buffer, size_t size)</div><div class="ttdef"><b>Definition:</b> serial.cc:124</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a9b57d6da619d53f58cddc3621c78c32b"><div class="ttname"><a href="classserial_1_1_serial.html#a9b57d6da619d53f58cddc3621c78c32b">serial::Serial::getBaudrate</a></div><div class="ttdeci">uint32_t getBaudrate() const </div><div class="ttdef"><b>Definition:</b> serial.cc:299</div></div>
<div class="ttc" id="classserial_1_1_serial_html_afafe25b2f3bb0809550abdc72c51a234"><div class="ttname"><a href="classserial_1_1_serial.html#afafe25b2f3bb0809550abdc72c51a234">serial::Serial::available</a></div><div class="ttdeci">size_t available()</div><div class="ttdef"><b>Definition:</b> serial.cc:99</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a1e1896aa59ec35ac5bd263b87614ef01"><div class="ttname"><a href="classserial_1_1_serial.html#a1e1896aa59ec35ac5bd263b87614ef01">serial::Serial::setParity</a></div><div class="ttdeci">void setParity(parity_t parity)</div><div class="ttdef"><b>Definition:</b> serial.cc:317</div></div>
<div class="ttc" id="classserial_1_1_serial_html_a318262c05074a9da15d410f8af29c15c"><div class="ttname"><a href="classserial_1_1_serial.html#a318262c05074a9da15d410f8af29c15c">serial::Serial::waitByteTimes</a></div><div class="ttdeci">void waitByteTimes(size_t count)</div><div class="ttdef"><b>Definition:</b> serial.cc:112</div></div>
<div class="ttc" id="namespaceserial_html_a93ef57a314b4e562f9eded6c15d34351"><div class="ttname"><a href="namespaceserial.html#a93ef57a314b4e562f9eded6c15d34351">serial::flowcontrol_t</a></div><div class="ttdeci">flowcontrol_t</div><div class="ttdef"><b>Definition:</b> serial.h:86</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Aug 20 2018 10:52:41 for serial by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
